package project.dade.cn.bst.base;

import android.app.Activity;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.readystatesoftware.systembartint.SystemBarTintManager;

import project.dade.cn.bst.utils.LogUtil;

public abstract class ParentFragment extends Fragment {
	protected static String TAG = ParentFragment.class.getSimpleName();
	public abstract int setRootViewID();

	private View rootView;

	public abstract void findView(View rootView);

	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		LogUtil.v(TAG, "onCreate");
		setRetainInstance(false);

	}

	@Override
	public View onCreateView(LayoutInflater i, ViewGroup c, Bundle b) {
		rootView = i.inflate(setRootViewID(), null);
		findView(rootView);
		return rootView;
	}

	/**
	 * 获取根布局
	 * @return
	 */
	public View getRootView() {
		return rootView;
	}

	@Override
	public void onResume() {
		super.onResume();
	}

	@Override
	public void onStart() {
		super.onStart();
	}

	@Override
	public void onPause() {

		super.onPause();
	}

	@Override
	public void onStop() {
		super.onStop();
	}

	@Override
	public void onDestroyView() {
		super.onDestroyView();
	}

	@Override
	public void onDestroy() {
		
		super.onDestroy();
	}

}
